﻿using UnityEngine;
using System.Collections;

public class CoinBehavior : MonoBehaviour {


	void OnTriggerEnter2D(Collider2D collider)
	{
		print (collider.gameObject.tag);

		if(collider.gameObject.tag=="Player")
		{
		 

			CoinController.coinCount++;

			Destroy(this.gameObject);




		}




	
	}
}
